#include "gameinfo.h"

#define WHITE		0
#define BLACK		1

GameInfo::GameInfo()
{
    _blackType = AI;
    _whiteType = HUMAN;

    _quitConfirmed = false;

    _aiDepth = 4;
}

GameInfo::~GameInfo()
{
    //dtor
}

void GameInfo::setBlack(PlayerType type)
{
    _blackType = type;
}

PlayerType GameInfo::getBlack()
{
    return _blackType;
}

void GameInfo::setWhite(PlayerType type)
{
    _whiteType = type;
}

PlayerType GameInfo::getWhite()
{
    return _whiteType;
}

PlayerType GameInfo::getPlayerTypeByColor(int color)
{
    if (color == WHITE)
        return _whiteType;
    else
        return _blackType;
}

void GameInfo::setPromotion(SpecialRuleType promotion)
{
    _lastPromotion = promotion;
}

SpecialRuleType GameInfo::getPromotion()
{
    return _lastPromotion;
}

void GameInfo::setPromotionX(int x)
{
    _promotionX = x;
}

int GameInfo::getPromotionX()
{
    return _promotionX;
}

void GameInfo::setPromotionY(int y)
{
    _promotionY = y;
}

int GameInfo::getPromotionY()
{
    return _promotionY;
}

void GameInfo::reset()
{
    //_blackType = AI;
    //_whiteType = HUMAN;

    _quitConfirmed = false;
}

void GameInfo::quit()
{
    _quitConfirmed = true;
}

bool GameInfo::shouldQuit()
{
    return _quitConfirmed;
}

void GameInfo::setAiDepth(int depth)
{
    _aiDepth = depth;
}

int GameInfo::getAiDepth()
{
    return _aiDepth;
}
